import java.util.ArrayList;

/**
 * string1="welcome to co"
 * string2="come"
 * 将string1中不包含string2的元素存储到集合list中
 */
public class DevidString {
    public static void main(String[] args) {
        String S1="welcome to coie";
        String S2="come";
        ArrayList<String> list=new ArrayList<>();
        for (int i = 0; i < S1.length(); i++) {
            char ch= S1.charAt(i);
            if(!S2.contains(ch+"")){
                list.add(ch+"");
            }
        }
        for (String s:
             list) {
            System.out.print(s);
        }
    }
}
